import { getAction, postAction } from '@/api/manage'
const baseURL  = window._CONFIG['domianURL']  || '/jeecg-boot'
const gateway = '/api/gateway/jic-backend-activity/store/package/'
export const downTemplate = baseURL + gateway + 'export'
export const importStoreInventory = baseURL + gateway + 'import'
export const downErrorStore = baseURL + gateway + 'errorTemplate?groupId='

export const queryProvince =  () => getAction(`${gateway}province`)
export const queryCity = params => getAction(`${gateway}city`, params)
export const queryDistrict = params => getAction(`${gateway}district`, params)
export const queryCustomer = () => getAction(`${gateway}customer`)
export const queryStoreArea = () => getAction(`${gateway}storeArea`)
export const queryStores = params => postAction(`${gateway}stores`,params)
export const deleteStore = id => getAction(`${gateway}storesDel?id=${id}`)
export const address = () => getAction(`${gateway}areaAddress`)

export const storePackage = params => postAction(`${gateway}addOrUpdate`,params)
export const deleteStorePackage = id => getAction(`${gateway}storeDelete`,{id})
export const updpateStorePackageStatus = params => getAction(`${gateway}storeStatus`,params)
export const storePackageDetail = id => getAction(`${gateway}storePackageDetails?id=${id}`)

export const downloadPackage = params =>getAction(`${gateway}downloadPackage`,params)
export const downList = params => postAction(`${gateway}downloadPage`,params)
export const asynOpenData = () => getAction(`${gateway}synchronousData`)
export const queryBrand = () => getAction(`${gateway}arcbrand`)

